<template>
  <el-dialog :title="info.title" :visible.sync="visible" center width="1060px" :before-close="handleCancel">
    <div class="">
      <el-table ref="multipleTable" class="search-table" :data="list" border fit highlight-current-row style="width: 100%;">
        <el-table-column label="序号" align="center" width="56px">
          <template slot-scope="{$index}">
            {{ $index + 1 }}
          </template>
        </el-table-column>
        <el-table-column label="归属单位" width="120px" prop="company" />
        <el-table-column label="客户名称" width="220px" prop="ctm_name" />
        <el-table-column label="项目名称" width="220px" prop="pro_name" />
        <el-table-column label="PO单号" width="190px">
          <template slot-scope="{row}">
            {{ 'PO'+row.pro_id }}
          </template>
        </el-table-column>
        <el-table-column label="开票日期" width="110px" align="center" prop="invoice_time" />
        <el-table-column label="发票号码" width="160px" prop="num" />
        <el-table-column label="未税金额" width="110px" align="right" prop="no_tax" />
        <el-table-column label="税额" width="110px" align="right" prop="tax" />
        <el-table-column label="含税金额" width="110px" align="right" prop="has_tax" />
        <el-table-column label="税率" width="110px" align="right" prop="rate" />
        <el-table-column label="付款项目" width="120px" prop="type" />
        <el-table-column label="收票日期" width="110px" align="center" prop="collect_time" />
        <el-table-column label="提交人" width="120px" prop="nickname" />
        <el-table-column label="备注" min-width="260px" prop="remark" />
        <el-table-column label="操作" align="center" width="90px" fixed="right">
          <template slot-scope="{row}">
            <el-dropdown>
              <el-button type="primary" size="mini">
                操作<i class="el-icon-arrow-down el-icon--right" />
              </el-button>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item
                  @click.native="files({e_id: row.id, type: '',
                                        db_type: 'logc_pro_invoice_archives'})"
                >
                  附 件
                </el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </template>
        </el-table-column>
      </el-table>
      <pagination v-show="filter.pageAll>0" :total="filter.pageAll" :page.sync="filter.pageCurrent" :limit.sync="filter.pageNumber" @pagination="getList" />
    </div>
    <Cos ref="cos" :info="dialog" />
  </el-dialog>
</template>

<script>
import { proinvs } from '@/api/project'
import Pagination from '@/components/Pagination'
import page from '@/utils/page'

export default {
  components: { Pagination },
  extends: page,
  props: {
    reqList: {
      default: proinvs,
      type: Function
    }
  },
  data() {
    return {
    }
  },
  watch: {
    visible(val) {
      if (val) {
        this.form = this.info.edit
        this.getList({pro_id : this.form.pro_id})
      }
    },
    getData: {
      type: Function,
      default: function() {}
    }
  },
  mounted() {
  },
  methods: {
  }
}
</script>

<style scoped>
</style>
